package com.doroodo.sys.service.impl;

import java.sql.SQLException;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.doroodo.sys.service.*;
import com.founder.fix.fixflow.core.ProcessEngine;
import com.founder.fix.fixflow.core.ProcessEngineManagement;
import com.founder.fix.fixflow.core.impl.ExternalContent;
@Service("syFixFlowervice")
public class SyFixFlowServiceImpl implements SyFixFlowService {
	@Autowired
	private DataSource dataSource;

	public void initFixFlow() {
		// TODO Auto-generated method stub
		ProcessEngine processEngine=ProcessEngineManagement.getDefaultProcessEngine();
		ExternalContent externalContent =new ExternalContent();
		try {
			externalContent.setConnection(dataSource.getConnection());
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		processEngine.setExternalContent(externalContent);
	}
	
}